/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package view.jPanels;

import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 *
 * @author Gean
 */
@Entity
@Table(name = "plaqueta", catalog = "", schema = "")
@NamedQueries({
    @NamedQuery(name = "Plaqueta.findAll", query = "SELECT p FROM Plaqueta p"),
    @NamedQuery(name = "Plaqueta.findByNumPlaqueta", query = "SELECT p FROM Plaqueta p WHERE p.numPlaqueta = :numPlaqueta"),
    @NamedQuery(name = "Plaqueta.findBySituacaoPlaq", query = "SELECT p FROM Plaqueta p WHERE p.situacaoPlaq = :situacaoPlaq")})
public class Plaqueta implements Serializable {
    @Transient
    private PropertyChangeSupport changeSupport = new PropertyChangeSupport(this);
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "NumPlaqueta")
    private Integer numPlaqueta;
    @Basic(optional = false)
    @Column(name = "SituacaoPlaq")
    private String situacaoPlaq;

    public Plaqueta() {
    }

    public Plaqueta(Integer numPlaqueta) {
        this.numPlaqueta = numPlaqueta;
    }

    public Plaqueta(Integer numPlaqueta, String situacaoPlaq) {
        this.numPlaqueta = numPlaqueta;
        this.situacaoPlaq = situacaoPlaq;
    }

    public Integer getNumPlaqueta() {
        return numPlaqueta;
    }

    public void setNumPlaqueta(Integer numPlaqueta) {
        Integer oldNumPlaqueta = this.numPlaqueta;
        this.numPlaqueta = numPlaqueta;
        changeSupport.firePropertyChange("numPlaqueta", oldNumPlaqueta, numPlaqueta);
    }

    public String getSituacaoPlaq() {
        return situacaoPlaq;
    }

    public void setSituacaoPlaq(String situacaoPlaq) {
        String oldSituacaoPlaq = this.situacaoPlaq;
        this.situacaoPlaq = situacaoPlaq;
        changeSupport.firePropertyChange("situacaoPlaq", oldSituacaoPlaq, situacaoPlaq);
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (numPlaqueta != null ? numPlaqueta.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Plaqueta)) {
            return false;
        }
        Plaqueta other = (Plaqueta) object;
        if ((this.numPlaqueta == null && other.numPlaqueta != null) || (this.numPlaqueta != null && !this.numPlaqueta.equals(other.numPlaqueta))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "view.jPanels.Plaqueta[ numPlaqueta=" + numPlaqueta + " ]";
    }

    public void addPropertyChangeListener(PropertyChangeListener listener) {
        changeSupport.addPropertyChangeListener(listener);
    }

    public void removePropertyChangeListener(PropertyChangeListener listener) {
        changeSupport.removePropertyChangeListener(listener);
    }
    
}
